home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / libelf / elf_getphdr.z / elf_getphdr
Encoding:
Text File  |  2002-10-03  |  3.5 KB  |  73 lines

  1. ELF_GETPHDR(3E)                                        Last changed: 1-8-99
  2.  
  3.  
  4. NNAAMMEE
  5.      eellff__ggeettpphhddrr eellff3322__ggeettpphhddrr, eellff3322__nneewwpphhddrr, eellff6644__ggeettpphhddrr, eellff6644__nneewwpphhddrr
  6.      - Retrieves class-dependent program header table
  7.  
  8. SSYYNNOOPPSSIISS
  9.      cccc [_f_l_a_g ...] _f_i_l_e ...  --lleellff [_l_i_b_r_a_r_y ...]
  10.  
  11.      ##iinncclluuddee <<lliibbeellff..hh>>
  12.  
  13.      EEllff3322__PPhhddrr **eellff3322__ggeettpphhddrr((EEllff **eellff));;
  14.  
  15.      EEllff3322__PPhhddrr **eellff3322__nneewwpphhddrr((EEllff **eellff,, ssiizzee__tt ccoouunntt));;
  16.  
  17.      EEllff6644__PPhhddrr **eellff6644__ggeettpphhddrr((EEllff **eellff));;
  18.  
  19.      EEllff6644__PPhhddrr **eellff6644__nneewwpphhddrr((EEllff **eellff,, ssiizzee__tt ccoouunntt));;
  20.  
  21. IIMMPPLLEEMMEENNTTAATTIIOONN
  22.      IRIX systems
  23.  
  24. DDEESSCCRRIIPPTTIIOONN
  25.      For a 32-bit class file, eellff3322__ggeettpphhddrr returns a pointer to the
  26.      program execution header table, if one is available for the ELF
  27.      descriptor, eellff.
  28.  
  29.      eellff3322__nneewwpphhddrr allocates a new table with ccoouunntt entries, regardless of
  30.      whether one existed previously, and sets the EELLFF__FF__DDIIRRTTYY bit for the
  31.      table [see eellff__ffllaagg(3E)].  Specifying a zero ccoouunntt deletes an existing
  32.      table.  Note that this behavior differs from that of eellff3322__nneewweehhddrr
  33.      [see eellff3322__ggeetteehhddrr(3E)], allowing a program to replace or delete the
  34.      program header table, and changing its size, if necessary.
  35.  
  36.      If no program header table exists, the file is not a 32-bit class
  37.      file, an error occurs, or eellff is null, both functions return a null
  38.      pointer.  eellff3322__nneewwpphhddrr also returns a null pointer if ccoouunntt is zero.
  39.  
  40.      The table is an array of EEllff3322__PPhhddrr structures, each of which includes
  41.      the following members:
  42.  
  43.      EEllff3322__WWoorrdd      pp__ttyyppee;;
  44.  
  45.      EEllff3322__OOffff       pp__ooffffsseett;;
  46.  
  47.      EEllff3322__AAddddrr      pp__vvaaddddrr;;
  48.  
  49.      EEllff3322__AAddddrr      pp__ppaaddddrr;;
  50.  
  51.      EEllff3322__WWoorrdd      pp__ffiilleesszz;;
  52.  
  53.      EEllff3322__WWoorrdd      pp__mmeemmsszz;;
  54.  
  55.      EEllff3322__WWoorrdd      pp__ffllaaggss;;
  56.  
  57.      EEllff3322__WWoorrdd      pp__aalliiggnn;;
  58.  
  59.      The ELF header's ee__pphhnnuumm member tells how many entries the program
  60.      header table has [see eellff__ggeetteehhddrr(3E)].  A program may inspect this
  61.      value to determine the size of an existing table; eellff3322__nneewwpphhddrr
  62.      automatically sets the member's value to ccoouunntt.  If the program is
  63.      building a new file, it is responsible for creating the file's ELF
  64.      header before creating the program header table.
  65.  
  66.      The 64-bit class works identically, simply replacing all instances of
  67.      32 in the description and table with 64.
  68.  
  69. SSEEEE AALLSSOO
  70.      eellff(3E), eellff__bbeeggiinn(3E), eellff__ffllaagg(3E), eellff__ggeetteehhddrr(3E)
  71.  
  72.      This man page is available only online.
  73.